<button type="button" nz-button nzType="primary" (click)="propertyAdd()">
    <i type="button" nz-icon nzType="plus"></i>
    添加
</button>
<nz-table nzTemplateMode [formGroup]="group">
    <thead>
    <tr>
        <th *ngFor="let item of _items">{{item.label}}</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody cdkDropList (cdkDropListDropped)="drop($event)" formArrayName="array">
    <tr *ngFor="let trData of formArray.controls; let i=index;" [formGroupName]="i" cdkDrag>
        <td *ngFor="let item of _items">
            <ng-container [ngSwitch]="item.type">
                <nz-input-number *ngSwitchCase="'number'"
                                 [formControlName]="item.name"
                                 [nzPlaceHolder]="item.placeholder"
                                 (nzBlur)="change()">
                </nz-input-number>
                <nz-select *ngSwitchCase="'select'"
                           [formControlName]="item.name"
                           (ngModelChange)="change()"
                           [nzPlaceHolder]="item.placeholder"
                           [nzOptions]="item.options">
                </nz-select>
                <nz-switch *ngSwitchCase="'switch'"
                           [formControlName]="item.name"></nz-switch>
                <input *ngSwitchDefault nz-input
                       [placeholder]="item.placeholder || ''"
                       [formControlName]="item.name"
                       (blur)="change()"/>
            </ng-container>
        </td>
        <td class="td-oper">
            <nz-space>
                    <span *nzSpaceItem nz-icon nzType="drag" nzTheme="outline" title="移动当前行" style="cursor:move;"
                          cdkDragHandle></span>
                <span *nzSpaceItem nz-icon nzType="copy" nzTheme="outline" title="复制当前行" style="cursor:pointer;"
                      (click)="handleCopyProperTy(i)"></span>
                <span *nzSpaceItem nz-icon nzType="delete" nzTheme="outline" title="删除" style="cursor:pointer;"
                      (click)="propertyDel(i)"></span>
            </nz-space>
        </td>
    </tr>
    </tbody>
</nz-table>
